package org.sixdog.mcsit.utils;

import javax.servlet.http.HttpServletRequest;

public class StringUtils {
    // 判断字符串是否为null 或者 是否为空串  (可填多个)
    public static boolean isBlank(String ... strs){
        for (String str:strs) {
            if (str == null || "".equals(str.trim())){
                return true;
            }
        }
        return false;
    }
   public static String getRequestIp(HttpServletRequest request){
       String ip=request.getHeader("x-forwarded-for");;
       if (request.getHeader("x-forwarded-for") == null) {
           ip = request.getRemoteAddr();
       }
       return ip;
   }


}
